const Tour = require('../../model/tour/Tour')

function change(req,res){
  console.log(req.body)
  Tour.findByIdAndUpdate(req.body.id, {
    tourName: req.body.tourName,
    tourHead: req.body.tourHead,
    tourContact: req.body.tourContact,
    tourAddress: req.body.tourAddress,

  }, function(err,result){
    if (err) {
        res.json({
            code:0,
            msg: '更新失败'
        })
    }else{
        res.json({
            code:1,
            msg: '更新成功'
        })
    }
  })


  
}
module.exports = change